#ifndef _TOPOGRAPHY_H_
#define _TOPOGRAPHY_H_

#include "cocos2d.h"
#include "Box2D/Box2D.h"
#include "GameEntity.h"
#include "Player.h"

USING_NS_CC;

class Topography : public GameEntity
{
  public:
    Topography(CCNode * parent, b2World * w, const CCPoint & start);
    virtual ~Topography();
    virtual bool init() = 0;
    virtual EntityType getEntityType();
    virtual void contactBeganWithPlayer(Player * pPlayer, b2Contact * pContact);
    virtual void contactEndWithPlayer(Player * pPlayer, b2Contact * pContact);
    virtual void destroyBody();
    virtual void createBody() = 0;
    virtual Topography * createNext() = 0;
    CCPoint getEndPoint();
    void addEntity(GameEntity * pChild);
  protected:
    CCPoint startPoint;
    CCPoint endPoint;
    CCNode * pParent;
    vector<GameEntity *> childBody;
};

#endif
